<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<title>充值与查询</title>
	<link rel="stylesheet" href="../layui-v2.6.8/layui/css/layui.css">
    <link rel="stylesheet" href="../css/investMoney.css">
	<link rel="shortcut icon" href="../img/hair.png">
	<script src="../js/common.js"></script>
	<script src="../js/investMoney.js"></script>
	<script src="http://static.runoob.com/assets/vue/1.0.11/vue.min.js"></script>
	<script src="https://cdn.bootcdn.net/ajax/libs/axios/0.21.0/axios.min.js"></script>
</head>
<body>
<div class="layui-layout layui-layout-admin">
	<div class="layui-header">
		<div class="layui-logo layui-hide-xs layui-bg-black">W·M</div>
		<!-- 头部区域（可配合layui 已有的水平导航） -->
		<ul class="layui-nav layui-layout-right">
			<li class="layui-nav-item layui-hide layui-show-md-inline-block">
				<a href="javascript:;">
					<img src="../img/geren.png" class="layui-nav-img">
					<span id="username"></span>
				</a>
				<dl class="layui-nav-child">
					<dd><a href="Personal_Information.html">个人信息</a></dd>
					<dd><a href="" onclick="logout()">退出登录</a></dd>
				</dl>
			</li>
			<li class="layui-nav-item" lay-header-event="menuRight" lay-unselect>
				<a href="javascript:;">
					<i class="layui-icon layui-icon-more-vertical"></i>
				</a>
			</li>
		</ul>
	</div>

	<div class="layui-side layui-bg-black">
		<div class="layui-side-scroll">
			<ul class="layui-nav layui-nav-tree" lay-filter="test">
				<li class="layui-nav-item layui-nav-itemed">
					<a class="layui-nav-item" href="MembershipManagement.html">会员管理</a>
				</li>
                <li class="layui-nav-item">
					<a href="investMoney.html">充值与查询</a>
				</li>
				<li class="layui-nav-item">
					<a href="addMembership.html">办理会员卡</a>
				</li>
				<li class="layui-nav-item">
					<a href="operation.html">会员操作记录</a>
				</li>
				<li class="layui-nav-item"><a href="profit.html">收益情况</a></li>
				<li class="layui-nav-item"><a href="Personal_Information.html">个人信息</a></li>
			</ul>
		</div>
	</div>

	<div class="layui-body" id="investMone">
		<div id="foundPerson">
			<label>查 询<input type="text" required maxlength="11" id="telnumber" placeholder="输入顾客电话号码" onkeyup="this.value=this.value.replace(/\D/g,'')"></label>
            <button type="button" onclick="findUserByTellPhone()" class="layui-btn layui-btn-normal layui-btn-radius" style="vertical-align: baseline;">搜索</button><br/>
		</div>
		<hr>
		<div>
			<h2>核对信息</h2>
			<div class="layui-form-item">
				<label class="layui-form-label">顾客姓名</label>
				<div class="layui-input-block">
				  <input type="text" name="title" value="" id="name" disabled class="layui-input">
				</div>
			  </div>
			  <div class="layui-form-item">
				<label class="layui-form-label">会员卡类型</label>
				<div class="layui-input-block">
				  <input type="text" name="title" disabled id="kind" value="" class="layui-input">
				</div>
			  </div>
		</div>
        <hr/>
        <div class="layui-form-item" id="investOne">
            <label class="layui-form-label">卡金余额(元)</label>
            <div class="layui-input-block">
              <input type="text" name="title" id="Balance" onkeyup="this.value=this.value.replace(/\D/g,'')"  maxlength="10" disabled value=""  class="layui-input">
              <input type="text" name="title" id="inMoney" onkeyup="this.value=this.value.replace(/\D/g,'')"  maxlength="10" class="layui-input">
			  <button class="layui-btn layui-btn-radius" disabled onclick="investCard()" id="invest" >充值</button>
            </div>
          </div>
		  <hr/>
		  <div id="times">
		  <h2>次数余额</h2>
		  <hr>
          <div class="layui-form-item">
            <label class="layui-form-label">剪发次数</label>
            <div class="layui-input-block">
              <input type="text" name="title" id="cutNum" onkeyup="this.value=this.value.replace(/\D/g,'')"  maxlength="10" disabled value=""  class="layui-input">
              <input type="text" name="title" id="inNum" onkeyup="this.value=this.value.replace(/\D/g,'')"  maxlength="10" class="layui-input">
			  <button class="layui-btn layui-btn-radius" disabled id="invest1" onclick="investTimes('剪发')">充值</button>
            </div>
          </div>
		  <div class="layui-form-item">
            <label class="layui-form-label">烫发次数</label>
            <div class="layui-input-block">
              <input type="text" name="title" id="perNum" onkeyup="this.value=this.value.replace(/\D/g,'')"  maxlength="10" disabled value=""  class="layui-input">
              <input type="text" name="title" id="inNum2" onkeyup="this.value=this.value.replace(/\D/g,'')"  maxlength="10" class="layui-input">
			  <button class="layui-btn layui-btn-radius" disabled id="invest2" onclick="investTimes('烫发')">充值</button>
            </div>
          </div>
		  <div class="layui-form-item">
            <label class="layui-form-label">护理次数</label>
            <div class="layui-input-block">
              <input type="text" name="title" id="nuseNum" onkeyup="this.value=this.value.replace(/\D/g,'')"  maxlength="10" disabled value=""  class="layui-input">
              <input type="text" name="title" id="inNum3" onkeyup="this.value=this.value.replace(/\D/g,'')"  maxlength="10" class="layui-input">
			  <button class="layui-btn layui-btn-radius" disabled id="invest3" onclick="investTimes('护理')">充值</button>
            </div>
          </div>
		  <div class="layui-form-item">
            <label class="layui-form-label">补发根次数</label>
            <div class="layui-input-block">
              <input type="text" name="title" id="rootNum" onkeyup="this.value=this.value.replace(/\D/g,'')"  maxlength="10" disabled value=""  class="layui-input">
              <input type="text" name="title" id="inNum4" onkeyup="this.value=this.value.replace(/\D/g,'')"  maxlength="10" class="layui-input">
			  <button class="layui-btn layui-btn-radius" disabled id="invest4" onclick="investTimes('补发根')" >充值</button>
            </div>
          </div>
		  <div class="layui-form-item">
            <label class="layui-form-label">染发次数</label>
            <div class="layui-input-block">
              <input type="text" name="title" id="dyeNum" onkeyup="this.value=this.value.replace(/\D/g,'')"  maxlength="10" disabled value=""  class="layui-input">
              <input type="text" name="title" id="inNum5" onkeyup="this.value=this.value.replace(/\D/g,'')"  maxlength="10" class="layui-input">
			  <button class="layui-btn layui-btn-radius" disabled id="invest5" onclick="investTimes('染发')">充值</button>
            </div>
          </div>
		  <div class="layui-form-item">
            <label class="layui-form-label">洗发次数</label>
            <div class="layui-input-block">
              <input type="text" name="title" id="washNum" onkeyup="this.value=this.value.replace(/\D/g,'')"  maxlength="10" disabled value=""  class="layui-input">
              <input type="text" name="title" id="inNum6" onkeyup="this.value=this.value.replace(/\D/g,'')"  maxlength="10" class="layui-input">
			  <button class="layui-btn layui-btn-radius" disabled id="invest6" onclick="investTimes('洗发')">充值</button>
            </div>
          </div>
		  <div class="layui-form-item">
            <label class="layui-form-label">黑油次数</label>
            <div class="layui-input-block">
              <input type="text" name="title" id="blackNum" onkeyup="this.value=this.value.replace(/\D/g,'')"  maxlength="10" disabled value=""  class="layui-input">
              <input type="text" name="title" id="inNum7" onkeyup="this.value=this.value.replace(/\D/g,'')"  maxlength="10" class="layui-input">
			  <button class="layui-btn layui-btn-radius" disabled id="invest7" onclick="investTimes('黑油')">充值</button>
            </div>
          </div>
		  <div class="layui-form-item">
			<label><input type="text" name="title" id="inNum8" placeholder="输入您的消费金额" onkeyup="this.value=this.value.replace(/\D/g,'')"  maxlength="5" class="layui-input"></label>
			<button class="layui-btn layui-btn-radius" disabled id="cost" onclick="cost()">消费</button>
		  </div>
		  <hr/>
		</div>
	</div>
	<div class="layui-footer" style="text-align:center;">
	W·M
	</div>
</div>
<script src="../layui-v2.6.8/layui/layui.js"></script>
<script>
	function dianhua() {
	//手机号验证
	const telephone = document.getElementById("telnumber").value;
	const reg1 =/^1([358][0-9]|4[579]|66|7[0135678]|9[89])[0-9]{8}$/;
	if (!reg1.test(telephone)) {
		alert("请顾客重新验证号码");
        tel.focus();
        return false;
	}
	else {
		return true;
	}
}
	//JS
	layui.use(['element', 'layer', 'util'], function(){
		var element = layui.element
			,layer = layui.layer
			,util = layui.util
			,$ = layui.$;

		//头部事件
		util.event('lay-header-event', {
			//左侧菜单事件
			menuLeft: function(othis){
				layer.msg('展开左侧菜单的操作', {icon: 0});
			}
			,menuRight: function(){
				layer.open({
					type: 1
					,content: '<div style="padding: 15px;">处理右侧面板的操作</div>'
					,area: ['260px', '100%']
					,offset: 'rt' //右上角
					,anim: 5
					,shadeClose: true
				});
			}
		});

	});
</script>
</body>
</html>
